package com.finley.flowabledemo.design.responsibility;


import cn.hutool.core.util.StrUtil;

/**
 * @description: 总经理
 * @author: xianfei.chao
 * @date 2025/5/31 22:02
 * @version: 1.0
 */
public class GeneralManager extends Manager {


    public GeneralManager(String name) {
        super(name);
    }

    @Override
    public void requestApplications(Request request) {
        if (request.getRequestType() == "请假") {
            System.out.println(StrUtil.format("{}:{}数量:{}被批准",
                    name, request.getRequestType(), request.getNumber()));
        } else if (request.getRequestType() == "加薪" && request.getNumber() <= 500) {
            System.out.println(StrUtil.format("{}:{}数量:{}被批准",
                    name, request.getRequestType(), request.getNumber()));
        }else if (request.getRequestType() == "加薪" && request.getNumber() > 500) {
            System.out.println(StrUtil.format("{}:{}数量:{}再说吧",
                    name, request.getRequestType(), request.getNumber()));}
    }
}
